<%@ page language="java" contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/base/jsp/taglibs.jsp"%>
<html>
<head>
<title></title>
<%@ include file="/base/jsp/jscss.jsp"%>

<script type="text/javascript" src="${ctx }/base/js/jquery.tableDynamicRow.js"></script>
<script type="text/javascript" src="${ctx }/base/js/jquery.tableHighlight.js"></script>

<script type="text/javascript">
	
	function onlyRead () {
// 		$("#username").validatebox('disable');
	}
	var dynamicRow=null;
	$(function(){
		dynamicRow = new $.tableDynamicRow({
			
			table:'.cty > tbody',
			template:$('#fetter_templete').html(),
			marker:'#index#',
			index:1,
			minRows:1,
			minRowsMessage:'至少保留 1 条记录.',
			maxRows:10,
			maxRowsMessage:'最多只能有 10 条记录.',
			onInsert:function(tr,index)
			{
				alert('insert'+tr);
				var id =tr.attr('id');
				var newId = "fetter_" + index ;
				var peopleId = "fetter_" + index;
				tr.attr('id',newId).find('a[rel="' + id + '"]').attr('rel',newId).attr('relPeople',peopleId);
			}
		});
	});
	function add () {
		dynamicRow.insert();
	}
</script>
</head>
<body>

text:<easy:text id="username" /><br/>
date:<easy:date id="ss" /><br />
select:<easy:select id="sex" code="sex" value="nan"/><br/>
checkBox:<easy:checkbox id="sex" code="sex" value="nan"/><br/>
radio:<easy:radio id="sex" code="sex" value="nv"/><br/>

<input type="button" onclick="onlyRead()"/>
<hr/>

	<a href="javascript:add ();" class="btn_add_row icon_add_16"
		id="btn_req_people_item_add">新增一行</a>
	<table class="cty" cellpadding="2" cellspacing="1" border="1">
		<tbody></tbody>
	</table>


<script id="fetter_templete" type="text/custom">
<tr id="fetter_#index#">
	<th>表名</th><th>表字段</th><th>显示名称</th><th>显示类型</th>
</tr>
</script>
</body>
</html>
